package com.shuoyue.ycgk.ui.questionbank.base;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseViewHolder;
import com.shuoyue.ycgk.R;
import com.shuoyue.ycgk.base.baseadapter.AppBaseQuickAdapter;
import com.shuoyue.ycgk.utils.GlideUtil;

import java.util.List;

public class ImageAdapter extends AppBaseQuickAdapter<String> {
    public ImageAdapter(@Nullable List<String> data) {
        super(R.layout.item_question_img, data);
    }

    /**
     * Implement this method and use the helper to adapt the view to the given item.
     *
     * @param helper A fully initialized helper.
     * @param item   The item that needs to be displayed.
     */
    @Override
    protected void convert(BaseViewHolder helper, String item) {
        GlideUtil.loadImage(mContext, item, R.mipmap.img_loading_gray, helper.getView(R.id.img));
    }
}
